package com.web;

import com.DisplayChatters;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("/displayUsers")
public class DisplayUsersController {
    @Resource
    private DisplayChatters displayChatters;

    @RequestMapping("/displayUsers")
    public String displayUsers(Model model) {
        model.addAttribute("userList", displayChatters.getUsers());
        return "displayUsers";
    }
}
